package com.javasm.springmybatis.timer;

import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

import java.util.Date;

/**
 * @Author：xieyunfan
 * @Version：1.0
 * @Date：2021/12/30-22:27
 * @Since:jdk1.8
 * @Description:
 */
public class SpringTimeTest {
    public static void main(String[] args) {
        ThreadPoolTaskScheduler threadPoolTaskScheduler = new ThreadPoolTaskScheduler();
        threadPoolTaskScheduler.initialize();
        threadPoolTaskScheduler.setPoolSize(30);
        threadPoolTaskScheduler.schedule(new Runnable() {
            @Override
            public void run() {
                System.out.println("dsds");
            }
        },new Date(
               System.currentTimeMillis()+2000
        ));


    }
}
